package com.springboot.orderno.util;

/**
 * * 枚举用来规范编码输出规范，可以自定义
 * eg: DB0001911220001,TR000191122000001,GD000191122000001
 */

public enum OrderNoEnum {
    LENGTH_FOUR(4, 1000, 9999),
    LENGTH_SIX(6, 100000, 999999),
    LENGTH_EIGHT(8, 10000000, 99999999);

    int length;
    int minNo;
    int maxNo;

    OrderNoEnum(int length, int minNo, int maxNo){
        this.length = length;
        this.minNo = minNo;
        this.maxNo = maxNo;
    }

    public int getLength() {
        return length;
    }

    public int getMinNo() {
        return minNo;
    }

    public int getMaxNo() {
        return maxNo;
    }
}
